from django.shortcuts import render

# Create your views here.
# Create your views here.
from django.views.generic import ListView, UpdateView, DeleteView, CreateView

from xtuser.models import user


class userlist(ListView):
    model = user
    template_name = "user_list.html"
    context_object_name = 'user_list'


class UserCreateView(CreateView):
    model = user
    fields = "__all__"
    template_name = "user_add.html"
    success_url = '/'


class UserDeleteView(DeleteView):
    model = user
    success_url = '/'
    template_name = "user_del.html"


class UserUpdateView(UpdateView):
    model = user
    fields = "__all__"
    success_url = '/'
    template_name = "user_up.html"
